package org.openscheduler.modules.listener;

import org.openscheduler.modules.scheduler.SchedulerService;
import org.quartz.ListenerManager;
import org.quartz.Scheduler;
import org.quartz.SchedulerException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ListenerService {
	
	@Autowired
	SchedulerService schedulerService;
	
	public ListenerManager getListenerManager(String schedName) throws SchedulerException {
		Scheduler scheduler = schedulerService.getScheduler(schedName);
		ListenerManager listenerManager = scheduler.getListenerManager();
		return listenerManager;
	}

}
